package com.cs.com.cs.springcloud.cfgbeans;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * ConfigBean
 *
 * @author zzc
 * @version 1.00
 * @Date 2019/3/18-13:24
 */
@Configuration //boot -->spring   applicationContext.xml --- @Configuration配置   ConfigBean 相当于 applicationContext.xml
public class ConfigBean {

    @Bean
    @LoadBalanced
    public RestTemplate getRestTemplate(){
        return new RestTemplate();
    }
}
